package com.hsp.homework_;

import java.util.Scanner;

public class Homework01 {
    public static void main(String[] args) {

        try {
            int n1 = 0;
            int n2 = 0;
            n1 = Integer.parseInt(args[0]);
            n2 = Integer.parseInt(args[1]);
            double res = Cal(n1, n2);
            System.out.println("结果=" + res);
        } catch (ArithmeticException e) {
            System.out.println("出现了除以0的情况");
        } catch (NumberFormatException e) {
            System.out.println("参数个数不对");
        } catch (ArrayIndexOutOfBoundsException e) {
            System.out.println(e.getMessage());
        }

    }
    public static double Cal(int n1 , int n2) {
        return n1 / n2;
    }
}
